<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/16
 * Time: 10:13
 */

namespace app\home\model;


use think\Model;

class User  extends Model
{
    protected $pk='id';
    protected $table='user';

    /**
     * 查找用户
     */
    public function findUser(){
        $res=$this->alias('u')
            ->join('user_personalinfo up','u.id = up.user_id')
            ->join('Usercertifies uc','u.userPhone = uc.phoneNumber')
            ->join('UserCompCertifies uco','u.id = uco.userID')
            ->join('userface uf','u.id = uf.user_id')
            ->limit(10)
            ->select();
        return $res;
    }
}